<template>
  <a-card class="info" title="erp_omc_contract_manager_trustee_final">
    <template slot="extra">
      <a-button
          class="ruleButton"
          :ghost="true"
          type="primary"
          icon="edit"
          @click="handleEdit(model)"
          :disabled="isDisabledAuth('erpOmcContractManagerTrusteeFinal:edit')"
      />
    </template>
    <a-row type="flex" justify="center">
      <a-col :span="24">
        <erp-omc-contract-manager-trustee-final-form ref="realForm" :disabled="true"
                                                     normal></erp-omc-contract-manager-trustee-final-form>
      </a-col>
    </a-row>
    <erp-omc-contract-manager-trustee-final-modal ref="modalForm"
                                                  @ok="modalFormOk"></erp-omc-contract-manager-trustee-final-modal>
  </a-card>
</template>

<script>

import { getAction } from '@/api/manage'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ErpOmcContractManagerTrusteeFinalForm from './modules/ErpOmcContractManagerTrusteeFinalForm'
import ErpOmcContractManagerTrusteeFinalModal from './modules/ErpOmcContractManagerTrusteeFinalModal'
import { DisabledAuthFilterMixin } from '@/mixins/DisabledAuthFilterMixin'

export default {
  name: 'ErpOmcContractManagerTrusteeFinalDetail',
  mixins: [JeecgListMixin, DisabledAuthFilterMixin],
  components: {
    ErpOmcContractManagerTrusteeFinalForm,
    ErpOmcContractManagerTrusteeFinalModal,
  },
  data() {
    return {
      model: {},
      id: '',
      url: {
        queryById: '/api/erp/omc/contractmanager/erpOmcContractManagerTrusteeFinal/queryById',
        delete: '/api/erp/omc/contractmanager/erpOmcContractManagerTrusteeFinal/delete',
      },
      confirmLoading: false,
      iconStyle: { 'font-size': '20px' },
    }
  },
  created() {
  },
  watch: {
    $route(to, from) {
      this.loadData();
    },
  },
  mounted() {
  },
  methods: {
    loadData() {
      const id = this.$route.params.id;
      getAction(this.url.queryById, { id }).then((res) => {
        if (res.success) {
          const model = res.result
          this.$refs.realForm.edit(model);
          this.model = model;
        }
      })
    },
  }
}
</script>
<style lang="less" scoped>
@import '~@assets/less/common.less';

.info {
  /deep/ .ant-card-head-title {
    flex: none;
    margin-right: 20px;
  }

  /deep/ .ant-card-extra {
    flex: 1;
    float: left;
  }
}
</style>
